/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chat;

import java.io.*;
import java.util.*;

/**
 *
 * @author Mathias
 */
public class ChatProperties {

    private Properties p = null;
    private Integer timeout = null;
    private Double loss = null;
    private Integer polling = null;

    public ChatProperties() {
    }

    public void read() throws NumberFormatException, FileNotFoundException, IOException {
        p = new Properties();

        FileInputStream in = new FileInputStream("chat.properties");
        p.load(in);
        timeout = Integer.parseInt(p.getProperty("timeout"));
        loss = Double.parseDouble(p.getProperty("loss"));
        polling = Integer.parseInt(p.getProperty("polling"));
    }

    public int getTimeout() {
        return timeout;
    }

    public double getLoss() {
        return loss;
    }

    public int getPolling() {
        return polling;
    }
}
